POV-Ray : Newsgroups : povray.general : Ingenious snow placement? : Ingenious snow placement? Server Time
2 Aug 2024 08:12:58 EDT (-0400)
  Ingenious snow placement?  
From: Tim Nikias
Date: 7 Dec 2004 14:42:00
Message: <41b60788@news.povray.org>
So, what I have: two meshes of the same tree. One is with all the tiny
branches, the other with just the big ones. What I want to do is place
spheres for a blob onto the less intricate tree, and then use it in
conjunction with the detailed tree. Thus, I get snow on the bigger branches
for the detailed tree.

Now, does anyone have any ingenious SDL-Code which would place the spheres
on the tree via trace()? I could go about, generate a field with millions of
particles and then just drop them, those that stick will stay, the rest will
get deleted, but I'd rather use a more sophisticated approach, which should
be faster. My initial idea was to generate a top-down image of the tree,
white=tree and black=empty space, and before actually shooting trace(), I
check this image if there's any tree beneath it. With an even distribution I
could thus quickly generate all the spots on the tree, but I'd have to
generate thousands of starting points of which again thousands will get
discarded once I test them against the image.

Anyone have any ideas or suggestions? I don't mind scripting the thing
myself, I just need a good algorithm which will work faster than
brute-force.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.